package org.jpropelleralt.jview.tango;

import org.jpropelleralt.jview.JViews;
import org.jpropelleralt.jview.icon.IconFactory;
import org.jpropelleralt.jview.icon.impl.ResourceIconFactory;

/**
 * Provides an {@link IconFactory} using Tango icons.
 */
public class TangoIconFactory extends ResourceIconFactory {

	private static final IconFactory INSTANCE = new TangoIconFactory();

	/**
	 * Get the shared instance of the {@link IconFactory}
	 * @return	{@link IconFactory} instance
	 */
	public static IconFactory instance() {
		return INSTANCE;
	}
	
	/**
	 * Set the shared instance of this {@link IconFactory}
	 * as the {@link JViews} default {@link IconFactory}
	 */
	public static void useAsDefault() {
		JViews.setIconFactory(instance());
	}
	
	private TangoIconFactory() {
		super(TangoIconFactory.class);
	}
}
